<template>
	<view>
		<template v-if='fromShare == 1'>
			<!-- #ifdef MP -->
			<view class="top_back" @click="backHome()" :style="{top: menuButtonObject.top+'px'}">
				<image :src="staticUrl+ '/images/jh_up/icon-back-home.png'" class="icon-back-home"></image>
			</view>
			<!-- #endif -->
			<!-- #ifdef H5 -->
			<view class="top_back" @click="backHome()">
				<image :src="staticUrl+ '/images/jh_up/icon-back-home.png'" class="icon-back-home"></image>
			</view>
			<!-- #endif -->
		</template>
		<template v-else>
			<!-- #ifdef MP -->
			<view class="top_back" @click="back(1)" :style="{top: menuButtonObject.top+'px'}">
				<text class="icon-xiangzuo iconfont"></text>
			</view>
			<!-- #endif -->
			<!-- #ifdef H5 -->
			<view class="top_back" @click="back(1)">
				<text class="icon-xiangzuo iconfont"></text>
			</view>
			<!-- #endif -->
		</template>
	</view>
</template>

<script>
	export default {
		name:'top',
		props:['fromShare'],
		data() {
			return {
				staticUrl: this.staticUrl,
			
				menuButtonObject: getApp().globalData.menuButtonObject,
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.top_back{
		width: 60rpx;
		height: 60rpx;
		border-radius: 50%;
		background: rgba(0,0,0,0.35);
		position: fixed;
		top: 30rpx;
		left: 30rpx;
		z-index: 28;
		display: flex;
		align-items: center;
		justify-content: center;
		.icon-xiangzuo{
			color: white;
			font-size: 40rpx;
			margin-left: -4rpx;
			opacity: 0.8;
		}
		.icon-back-home{
			width: 38rpx;
			height: 38rpx;
		}
	}
</style>
